﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using YodaMaster.Models;


namespace YodaMaster.Models
{
         public class FacultyRepository
           {
              public Faculties Fac {set; get; }
              public List<string> faculties { set; get; }
              public List<SelectListItem> GetFaculties()
               {
                  Fac = new Faculties();
                  faculties = Fac.faculties;
                     var vitem = (from item in faculties 
                                     select new SelectListItem
                                         {
                                                Text = item,
                                                Value = item
                                         });
 
                     return vitem.ToList();
 
              }
          }
    }